<template>
    <div class="watch_list">
        <div class="top">
            <div>
                <img
                    :src="'http://43.138.15.137:3000' + (!item.Video.userAvatar ? '/assets/avatar/default.png' : item.Video.userAvatar)">
            </div>
            <div>
                @{{ item.Video.userNickname }}
            </div>
        </div>
        <div class="video_big">
            <video autoplay="0" :src="item.Video ? item.Video.videoPath : ''" class="content_cont"></video>
        </div>
        <div class="btm">
            <div>
                <div class="aixin">
                    <aixin />
                </div>
                <div class="text">{{ item.WSLCNum.likeNum }}</div>
            </div>
            <div>
                <div class="video_messge">
                    <div></div>
                    <div></div>
                    <div></div>
                </div>
                <div class="text2">{{ item.WSLCNum.commentNum }}</div>
            </div>
            <div>
                <div>
                    <div class="video_share">
                        <div class="top_yuan"></div>
                        <div class="btm_yuan"></div>
                        <div class="lef_yuan"></div>
                        <div class="s1"></div>
                        <div class="s2"></div>
                    </div>
                </div>
                <div class="text2">{{ item.WSLCNum.shareNum }}</div>
            </div>
        </div>
        <div class="time">
            2024-2-12
        </div>
    </div>
</template>
<script setup>
import { defineAsyncComponent } from 'vue';
const aixin = defineAsyncComponent(() => import('../common/little_love.vue'))
const props = defineProps(
    {
        item: {
            type: Object,
        },
        index: {
            type: Number,
        }
    }
)
</script>
<style lang="scss" scoped>
@function r($v) {
    @return $v / (390 /10rem)
}

.content_cont {
    width: 100%;
    max-height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

.watch_list {
    width: 100%;
    padding: r(10) r(10);
    border: 1px solid #333;

    .time {
        color: #8b8c96;
        font-size: r(12);
        text-align: right;
    }

    .btm {
        width: 100%;
        height: r(40);
        margin: r(10) 0;
        display: flex;

        >div {
            flex: 1;
            display: flex;
            justify-content: center;
            align-self: center;
            font-size: r(12);
            color: #fff;

            .text {
                padding-top: r(4);
            }

            .text2 {
                line-height: r(40);
                margin-left: r(6);
            }

            .aixin {
                width: r(20);
                height: r(20);
                margin-top: 2px;
                margin-right: r(15);
            }
        }
    }

    .top {
        color: #fff;
        display: flex;
        align-items: center;
        height: r(32);
        color: #fff;
        font-size: r(14);
        margin-bottom: r(15);

        img {
            border-radius: 50%;
            width: r(32);
            height: 100%;
            margin-right: r(10);
        }
    }

    .video_big {
        width: 100%;
        height: r(400);
        position: relative;
    }
}

.video_messge {
    width: r(40);
    height: r(40);
    border-radius: 50%;
    box-sizing: border-box;
    border: r(3) solid #fff;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: relative;

    div {
        width: r(5);
        height: r(5);
        background-color: #fff;
        border-radius: 50%;
    }
}

.video_share {
    width: r(40);
    height: r(40);
    position: relative;

    .s1 {
        width: r(12);
        height: r(3);
        background-color: #fff;
        position: absolute;
        top: r(10);
        left: 50%;
        transform-origin: right center;
        transform: translateX(-50%) rotate(-30deg);
    }

    .s2 {
        width: r(12);
        height: r(3);
        background-color: #fff;
        position: absolute;
        bottom: r(10);
        left: 50%;
        transform-origin: right center;
        transform: translateX(-50%) rotate(30deg);
    }

    .top_yuan {
        position: absolute;
        top: r(5);
        right: r(5);
        width: r(10);
        height: r(10);
        border-radius: 50%;
        box-sizing: border-box;
        border: r(3) solid #fff;
    }

    .btm_yuan {
        position: absolute;
        bottom: r(5);
        right: r(5);
        width: r(10);
        height: r(10);
        border-radius: 50%;
        box-sizing: border-box;
        border: r(3) solid #fff;
    }

    .lef_yuan {
        position: absolute;
        top: 50%;
        left: r(5);
        width: r(14);
        height: r(14);
        border-radius: 50%;
        box-sizing: border-box;
        border: r(3) solid #fff;
        transform: translateY(-50%);
    }
}
</style>